home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / CLOBSH.PAK / COLLECT.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  62 lines

  1. /*------------------------------------------------------------------------*/
  2. /*                                                                        */
  3. /*  COLLECT.H                                                             */
  4. /*                                                                        */
  5. /*  Copyright Borland International 1991, 1993                            */
  6. /*  All Rights Reserved                                                   */
  7. /*                                                                        */
  8. /*------------------------------------------------------------------------*/
  9.  
  10. #if !defined( __COLLECT_H )
  11. #define __COLLECT_H
  12.  
  13. #define BI_OLDNAMES
  14.  
  15. #if !defined( __CLSTYPES_H )
  16. #include "classlib\obsolete\ClsTypes.h"
  17. #endif  // __CLSTYPES_H
  18.  
  19. #if !defined( __OBJECT_H )
  20. #include "classlib\obsolete\Object.h"
  21. #endif  // __OBJECT_H
  22.  
  23. #if !defined( __CONTAIN_H )
  24. #include "classlib\obsolete\Contain.h"
  25. #endif  // __CONTAIN_H
  26.  
  27. #pragma option -Vo-
  28. #if defined( __BCOPT__ ) && !defined( __FLAT__ ) && !defined( _ALLOW_po )
  29. #pragma option -po-
  30. #endif
  31.  
  32. _CLASSDEF(ContainerIterator)
  33. _CLASSDEF(Collection)
  34.  
  35. class _CLASSTYPE Collection : public Container
  36. {
  37.  
  38. public:
  39.  
  40.     virtual void add( Object _FAR & ) = 0;
  41.     virtual void detach( Object _FAR &, DeleteType = NoDelete ) = 0;
  42.     void destroy( Object _FAR & o )
  43.         {
  44.         detach( o, DefDelete );
  45.         }
  46.  
  47.     virtual int hasMember( Object _FAR & obj ) const
  48.         {
  49.         return findMember( obj ) != NOOBJECT;
  50.         }
  51.  
  52.     virtual Object _FAR & findMember( Object _FAR & ) const;
  53.  
  54. };
  55.  
  56. #if defined( __BCOPT__ ) && !defined( __FLAT__ ) && !defined( _ALLOW_po )
  57. #pragma option -po.
  58. #endif
  59. #pragma option -Vo.
  60.  
  61. #endif
  62.